<script type="text/javascript">
$(function(){
	$('#siteNewDialog').dialog({   
		title:'栏目',
		width:320,
		height:398,
		modal: true
	}); 
	$('#siteNewDialog').dialog("close");
	$('#siteNewName').click(function(){
		$('#siteNewDialog').dialog("open");
		$('#siteNewTree').tree({
			url:'/modules/column/article/articleTreeList.html',
			onClick: function(node){
				$('#siteId').val(node.id);
				$('#siteNewName').val(node.text);
				$('#siteNewDialog').dialog("close");
			}
		});
	});
    $.fn.dataGridOptions.formSubFun("#form",'/modules/column/article/articleEdit.html'); //表单提交  参数1：表单id 参数2：表单action地址
});
</script>
<div class="popForm">
    <form id="form"  method="post" enctype="multipart/form-data">
		<input name="picPath" value="${articleNew.picPath!}" type="hidden"/>
		<input name="addIp" value="${articleNew.addIp!}" type="hidden"/>
		<input name="addTime" value="${articleNew.addTime?string('yyyy-MM-dd HH:mm:ss')}" type="hidden"/>
		<input name="clicks" value="${articleNew.clicks!}" type="hidden"/>
		<input name="id" value="${articleNew.id!}" type="hidden"/>
    	<div class="formitm">
		     <label class="lab">栏目：</label>
		     <div class="ipt">
		     	<input type="text" id="siteNewName" class="w400 easyui-validatebox" name="siteNewName" value="${siteNew.name!}">
		     	<input type="hidden" id="siteId" name="siteId" value="${siteNew.id!}">
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">标题：</label>
		     <div class="ipt">
		     	<input type="text" name="title" value="${articleNew.title}" class="w400 easyui-validatebox" data-options="required: true,validType:'length[4,50]'" />
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">状态：</label>
		     <div class="ipt">
		     	<input type="radio" name="status" value="0" <#if articleNew.status?? && articleNew.status ==0>checked="checked"</#if>/>&nbsp;&nbsp;隐藏
				<input type="radio" name="status" value="1" <#if articleNew.status?? && articleNew.status ==1>checked="checked"</#if>/>&nbsp;&nbsp;显示
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">排序：</label>
		     <div class="ipt">
		     	<input type="text" name="sort" value="${articleNew.sort}" class="easyui-numberbox" data-options="required:true,validType:'length[1,4]'" maxlength="4"/>
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">是否推荐：</label>
		     <div class="ipt">
		     	<input type="radio" name="isRecommend" value="0" <#if articleNew.isRecommend?? && articleNew.isRecommend ==0>checked="checked"</#if>/>&nbsp;&nbsp;否
				<input type="radio" name="isRecommend" value="1" <#if articleNew.isRecommend?? && articleNew.isRecommend ==1>checked="checked"</#if>/>&nbsp;&nbsp;是
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">是否置顶：</label>
		     <div class="ipt">
		     	<input type="radio" name="isTop" value="0" <#if articleNew.isTop?? && articleNew.isTop ==0>checked="checked"</#if>/>&nbsp;&nbsp;否
				<input type="radio" name="isTop" value="1" <#if articleNew.isTop?? && articleNew.isTop ==1>checked="checked"</#if>/>&nbsp;&nbsp;是
		     </div>
		</div>
		<div class="formitm">
			<label class="lab">图片链接：</label>
			<div class="ipt">
				<input type="text" name="url" value="${articleNew.url!}" class="w400 easyui-validatebox">
			</div>
		</div>
		<div class="formitm">
		     <label class="lab">图片：</label>
		     <div class="ipt">
		     	<input type="file" name="file">	
		     </div>
		</div>
		<#if articleNew.picPath?? && (articleNew.picPath?length gt 0)>
		<div class="formitm">
		     <div class="ipt">
		     	<img src="${image_server_url}${articleNew.picPath!}">	
		     </div>
		</div>
		</#if>
		<div class="formitm">
			<label class="lab">简介：</label>
			<div class="ipt">
				<textarea class="w400 easyui-validatebox" name="introduction" data-options="validType:'maxLength[150]'" maxlength="150">${articleNew.introduction!}</textarea>
			</div>
		</div>
		 <div class="formitm">
		     <label class="lab">内容：</label>
		     <div class="ipt">
		     	<!-- <textarea class="w400 easyui-validatebox" name="content">${articleNew.content!}</textarea>	 -->
		     	<#include "umeditor.htm">
				<@showUeditor width=600 heigth=400 id="articleEditor" name="content" content="${articleNew.content!}"/>
		     </div>
		</div>
	</form>
</div>
<div id="siteNewDialog">
	<ul id="siteNewTree"></ul>
</div>